package com.whfc.ms.api.md.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.ms.api.md.service.MdSafetyBoardService;
import com.whfc.safety.dto.*;
import com.whfc.safety.service.SafetyCheckService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021/11/17 14:05
 */
@Service
public class MdSafetyBoardServiceImpl implements MdSafetyBoardService {


    @DubboReference(interfaceClass = com.whfc.safety.service.MdSafetyBoardService.class, version = "1.0.0")
    private com.whfc.safety.service.MdSafetyBoardService mdSafetyBoardService;

    @DubboReference(interfaceClass = SafetyCheckService.class, version = "1.0.0")
    private SafetyCheckService safetyCheckService;

    @Override
    public ListData<MdSafetyStatisticsDTO> getCheckTypeStatistics(Integer deptId, Date startTime, Date endTime) {
        return mdSafetyBoardService.getCheckTypeStatistics(deptId, startTime, endTime);
    }

    @Override
    public PageData<MdSafetyStatisticsDTO> getCheckTypeStatistics(Integer deptId, Date startTime, Date endTime, Integer pageNum, Integer pageSize) {
        return mdSafetyBoardService.getCheckTypeStatistics(deptId, startTime, endTime, pageNum, pageSize);
    }

    @Override
    public ListData<SafetyCheckPartStatisticalDTO> getCheckPartStatistics(Integer deptId, Date startTime, Date endTime) {
        return mdSafetyBoardService.getCheckPartStatistics(deptId, startTime, endTime);
    }

    @Override
    public PageData<MdSafetyCheckDTO> getCheckList(Integer deptId, Integer pageNum, Integer pageSize) {
        return mdSafetyBoardService.getCheckList(deptId, pageNum, pageSize);
    }

    @Override
    public MdSafetyCheckAnalysisDTO getCheckAnalysis(Integer deptId) {
        return mdSafetyBoardService.getCheckAnalysis(deptId);
    }

    @Override
    public PageData<MdSafetyCheckLogDTO> getCheckLog(Integer deptId, Integer pageNum, Integer pageSize) {
        return mdSafetyBoardService.getCheckLog(deptId, pageNum, pageSize);
    }

    @Override
    public SafetyCheckUnfinishedDTO qualityCheckUnfinished(Integer deptId, Date startTime, Date endTime) {
        return safetyCheckService.safetyCheckUnfinished(deptId, startTime, endTime);
    }
}
